home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD014b.dsk
/
MASTER CATALOG.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
7KB
|
211 lines
30 HIMEM: 37120: TEXT
50 REM TN$ MUST BE 1ST VAR & LENGTH 30
60 TN$ = "H "
70 D$ = CHR$(4)
80 N = -1
90 PRINT D$;"NOMONC,I,O"
100 PRINT D$;"BLOAD B.MASTER.CATALOG 48K"
110 CALL 37888
120 IF PEEK(28) = 1 THEN PRINT "<CTRL-G>TN$ ERROR": END
130 DIM NA$(1200)
140 GOTO 1000
150 REM MOVE NAME
160 IF PEEK(28) = 0 THEN 190
170 IF PEEK(28) = 255 THEN POP : RETURN
180 NORMAL : PRINT "<CTRL-G>DISK ERROR": POP : END
190 N = N +1
200 NA$(N) = V$ +VI$
210 TY = PEEK(27): IF TY >4 THEN TY = TY -128
220 IF TY = 0 THEN NA$(N) = NA$(N) +" T "
230 IF TY = 1 THEN NA$(N) = NA$(N) +" I "
240 IF TY = 2 THEN NA$(N) = NA$(N) +" A "
250 IF TY = 4 THEN NA$(N) = NA$(N) +" B "
260 L = LEN(TN$) -3: FOR I = 1 TO L
270 IF MID$ (TN$,I,3) = " " THEN NA$(N) = NA$(N) + LEFT$(TN$,I -1): GOTO 300
280 NEXT I
290 NA$(N) = NA$(N) + LEFT$(TN$,29)
300 RETURN
310 REM READ CATALOG & PUT
320 REM PROGRAM NAMES IN NA$(XX)
330 CALL 37891: REM 1ST SECTOR
340 V$ = STR$( PEEK(26)): IF LEN(V$) <3 THEN V$ = LEFT$("00",3 - LEN(V$)) +V$
350 :N = N +1: FLASH : PRINT "ADDING VOLUME ";V$
360 FS% = PEEK(29) + PEEK(30) *256:FS$ = STR$(FS%):DF$ = STR$(FS%/4): IF LEN(FS$) <3 THEN FS$ = LEFT$(" ",3 - LEN(FS$)) +FS$
370 NA$(N) = V$ +VI$ +" FREE SECTORS = " +FS$ +" (" +DF$ +"K)"
380 GOSUB 150
390 CALL 37894: REM LOOK FOR MORE
400 GOSUB 150
410 GOTO 390
500 INPUT "WHICH SLOT FOR PRINTER? ";SLOT: PRINT D$"PR#"SLOT: GOTO 1200
600 PRINT D$"PR#0": GOTO 1200
1000 NORMAL : HOME
1010 INVERSE : HTAB 8: PRINT "MASTER CATALOG";: NORMAL : PRINT " - FROM SOFTDISK"
1040 PRINT : PRINT : HTAB 11: INVERSE : PRINT "OPTIONS": NORMAL
1050 PRINT
1060 HTAB 5: PRINT "0 MENU"
1070 HTAB 5: PRINT "1 DELETE FILE"
1080 HTAB 5: PRINT "2 ADD A VOLUME"
1090 HTAB 5: PRINT "3 DELETE A VOLUME"
1100 HTAB 5: PRINT "4 LIST FILE"
1110 HTAB 5: PRINT "5 CATALOG DISK"
1120 HTAB 5: PRINT "6 SAVE FILE"
1130 HTAB 5: PRINT "7 FIND PROGRAM NAME"
1140 HTAB 5: PRINT "8 NO. ENTRIES IN MEMORY"
1150 HTAB 5: PRINT "9 EXIT"
1160 HTAB 4: PRINT "10 PRINTER ON"
1170 HTAB 4: PRINT "11 PRINTER OFF"
1190 VTAB 21
1200 PRINT : INPUT "OPTION ";OP
1210 IF OP <0 OR OP >11 THEN 1190
1215 IF OP = 10 THEN 500
1216 IF OP = 11 THEN 600
1220 IF OP = 0 THEN 1000
1230 ON OP GOTO 1500,2000,3000,4000,5000,7000,9500,7500,8000
1500 REM DELETE FILE
1510 INPUT "FILE NAME? ";FL$: IF FL$ = "" THEN 1000
1520 PRINT "TO DELETE '";FL$;"'"
1530 PRINT "ENTER '<CONTROL> Y'; ELSE RETURN"
1540 GET A$
1550 IF A$ < > CHR$(25) THEN 1000
1560 PRINT
1570 ONERR GOTO 1600
1580 PRINT D$"DELETE ";FL$;",V0"
1590 GOTO 1000
1600 POKE 216,0:X = PEEK(222)
1610 IF X = 6 THEN 1000
1620 RESUME
2000 REM ADD A VOLUME
2010 IF ID < >0 THEN 2080
2020 PRINT "DO YOU WANT TO ASSIGN EACH SECONDARY": PRINT "VOLUME I.D. FOR THIS RUN? (Y/N)"
2030 GET A$
2040 IF A$ = "Y" THEN ID = 2: GOTO 2090
2050 PRINT : PRINT "O.K., I WILL ASSIGN THEM BEGINNING WITH": PRINT "A NUMBER OF YOUR CHOICE.": PRINT
2060 PRINT : PRINT "INPUT A STARTING SECONDARY VOLUME": INPUT "I.D. (0-900) ";VI: IF VI <0 OR VI >900 THEN 2060
2070 ID = 1: GOTO 2100
2080 IF ID = 1 THEN VI = VI +1: GOTO 2100
2090 INPUT "SECONDARY VOLUME I.D. (0-900)? ";VI: IF VI <0 OR VI >900 THEN 2090
2100 VI$ = STR$(VI): IF LEN(VI$) <3 THEN VI$ = LEFT$("00",3 - LEN(VI$)) +VI$
2110 VI$ = " " +VI$
2120 PRINT " INSERT DISKETTE"
2130 PRINT "AND HIT RETURN"
2140 GET A$
2150 POKE (28),0
2160 GOSUB 310: REM READ CATALOG
2170 X = X +1: IF X - INT(X/5) *5 = 0 THEN F = FRE(0)
2180 GOTO 1000
3000 REM DELETE A VOLUME
3010 PRINT
3015 PRINT "FILE MUST BE STORED ON DISK BEFORE": PRINT "A VOLUME CAN BE DELETED."
3017 PRINT : INPUT "DO YOU WANT TO DELETE VOLUME?";X9$
3018 IF X9$ < >"Y" AND X9$ < >"YES" THEN GOTO 1000
3020 GOSUB 10200
3030 PRINT "DELETE PRIMARY OR SECONDARY VOLUME (P/S)?": GET A$
3040 IF A$ = "P" THEN N% = 1:A$ = "PRIMARY": GOTO 3070
3050 IF A$ = "S" THEN N% = 5:A$ = "SECONDARY": GOTO 3070
3060 GOTO 3030
3070 PRINT A$;: INPUT " VOLUME NUMBER? ";VD$
3080 IF LEN(VD$) <3 THEN VD$ = LEFT$("00",3 - LEN(VD$)) +VD$
3090 ONERR GOTO 3160
3100 PRINT D$"READ ";FL$
3110 I = -1
3120 I = I +1
3130 INPUT NA$(I)
3140 IF MID$ (NA$(I),N%,3) = VD$ THEN 3130
3150 GOTO 3120
3160 POKE 216,0:X = PEEK(222)
3170 IF X = 5 THEN GOSUB 10000:N = I -1: GOTO 7050
3180 RESUME
3900 IF PEEK(37) <21 OR SLOT THEN 3940
3910 PRINT "'RETURN' FOR MORE. 'ESC' TO MENU"
3920 GET A$: IF A$ = CHR$(27) THEN POP : GOTO 1000
3930 HOME : PRINT
3940 RETURN
4000 REM LIST CATALOG
4005 INPUT "DO YOU WANT A NEW FILE LOADED? ";X9$
4007 IF X9$ = "Y" OR X9$ = "YES" THEN N = 0:ID = 0
4010 IF N >0 THEN 4110
4020 ONERR GOTO 4080
4030 GOSUB 10200
4040 PRINT D$;"READ ";FL$
4050 N = N +1
4060 INPUT NA$(N)
4070 GOTO 4050
4080 POKE 216,0:X = PEEK(222)
4090 IF X = 5 THEN GOSUB 10000:N = N -1: GOTO 4110
4100 RESUME
4110 HOME
4120 TI% = 0:TF% = 0:TT% = 0:TB% = 0:TN% = 0
4130 GOSUB 10100
4140 IF N <0 THEN 4240
4150 PR# SLOT: FOR I = 0 TO N
4160 PRINT NA$(I)
4170 IF MID$ (NA$(I),9,1) = "I" THEN TI% = TI% +1: GOTO 4220
4180 IF MID$ (NA$(I),9,1) = "A" THEN TF% = TF% +1: GOTO 4220
4190 IF MID$ (NA$(I),9,1) = "T" THEN TT% = TT% +1: GOTO 4220
4200 IF MID$ (NA$(I),9,1) = " " THEN 4220
4210 TB% = TB% +1
4220 GOSUB 3900
4230 NEXT I
4240 TN% = TI% +TF% +TT% +TB%
4250 PRINT : HTAB 11: PRINT "NUMBER OF PROGRAMS"
4260 PRINT "INT FP TEXT MACH TOTAL"
4270 PRINT TI%; TAB( 7);TF%; TAB( 14);TT%; TAB( 21);TB%; TAB( 28);TN%
4280 PRINT "RETURN TO MENU: 0"
4290 PRINT "<CTRL-D>PR#0": GOTO 600
5000 REM CATALOG DISK
5010 PRINT D$"CATALOG"
5020 INPUT "PRESS RETURN TO CONTINUE";X9$
5030 GOTO 1000
7000 REM SAVE CATALOG
7010 INPUT "FILE NAME? ";FL$: IF FL$ = "" THEN 1000
7020 PRINT "INSERT '";FL$;"' DISKETTE"
7030 PRINT "AND HIT RETURN"
7040 GET A$
7050 PRINT
7060 ONERR GOTO 7090
7070 PRINT D$"DELETE ";FL$;",V0"
7080 GOTO 7120
7090 POKE 216,0:X = PEEK(222)
7100 IF X = 6 THEN 7120
7110 RESUME
7120 IF N <0 THEN 1000
7130 PRINT D$"OPEN ";FL$",V0"
7140 PRINT D$"WRITE ";FL$
7150 FOR I = 0 TO N
7160 PRINT NA$(I)
7170 NEXT I
7180 PRINT D$"CLOSE ";FL$
7190 GOTO 1000
7500 REM NO. PGM ENTRIES
7510 L = N +1
7520 INVERSE : PRINT "COMPUTING FREE MEMORY": NORMAL
7530 F = FRE(0): PRINT "TOTAL NO. OF ENTRIES = ";L: PRINT "ROOM FOR APPROX. "; INT(F/22);" MORE"
7540 GOTO 4280
8000 REM END
8010 POKE 216,0: END
9500 REM FIND PROGRAM NAME
9510 INPUT "PROGRAM NAME? ";PN$:L = LEN(PN$): IF L = 0 THEN 1000
9520 IF N >0 THEN 9600
9530 GOSUB 10200
9540 GOSUB 10100
9550 ONERR GOTO 9630
9560 PRINT D$"READ ";FL$
9570 INPUT FI$
9580 IF PN$ = MID$ (FI$,11,L) THEN PRINT FI$: GOSUB 3900
9590 GOTO 9570
9600 GOSUB 10100: FOR I = 0 TO N
9610 IF PN$ = MID$ (NA$(I),11,L) THEN PRINT NA$(I): GOSUB 3900
9620 NEXT I: GOTO 4280
9630 POKE 216,0:X = PEEK(222)
9640 IF X = 5 THEN GOSUB 10000: GOTO 4280
9650 RESUME
10000 PRINT D$"CLOSE ";FL$
10010 RETURN
10100 HOME : PRINT "VOL SID TYPE PROGRAM": RETURN
10200 INPUT "FILE NAME? ";FL$
10210 IF LEN(FL$) = 0 THEN POP : GOTO 1000
10220 PRINT D$"OPEN ";FL$;",V0"
10230 RETURN
62999 REM MASTER CATALOG COPYRIGHT 1979 BY ALAN G. HILL
63000 REM MODIFIED FOR SOFTDISK BY ALLEN MAYNARD
63001 REM OCTOBER 1982